package com.hmall.item.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import com.hmall.common.dto.PageDTO;
import com.hmall.item.pojo.Item;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public interface IItemService extends IService<Item> {

    /**
     * 处理超时订单回复库存
     * @param itemId
     * @param num
     */
    void refundItemStock(Long itemId, Integer num);

    //修改商品
    void updateItem(Item itemId);

    //根据ID删除商品
    void deleteItem(Integer itemId);

    // 上架下架商品
    void enableAndDisableItem(Long itemId, Integer status);

    public Item getByItemId(Long id);

    public int addItem(Item item);

    PageDTO<Item> pageList(Long page, Long size);
}
